/*
 * Created by SharpDevelop.
 * User: Steve
 * Date: 26/10/2006
 * Time: 11:21 PM
 * 
 * To change this template use Tools | Options | Coding | Edit Standard Headers.
 */

using System;
using System.Drawing;

namespace Mokey.ThunderCards.Cards
{
	/// <summary>
	/// This class contains the details of a loaded ThunderCard
	/// </summary>
	public class ThunderCard
	{
		public ThunderCard()
		{
		}
		
		public ThunderCard(string question, string answer,
		                   string questionImageFileName, string answerImageFileName,
		                   string soundFileName)
		{
			_question = question;
			_answer = answer;
			_questionImageFileName = questionImageFileName;
			_answerImageFileName = answerImageFileName;
			_soundFileName = soundFileName;
		}

		#region Private Fields
		
		private string _answer;
		private string _question;
		private string _answerImageFileName;
		private string _questionImageFileName;
		private string _soundFileName;

		#endregion
		
		#region Public Fields
		
		public string QuestionImageFileName {
			get {
				return _questionImageFileName;
			}
			set {
				_questionImageFileName = value;
			}
		}
		public string AnswerImageFileName {
			get {
				return _answerImageFileName;
			}
			set {
				_answerImageFileName = value;
			}
		}		
		public string Question 
		{
			get 
			{
				return _question;
			}
			set 
			{
				_question = value;
			}
		}
		public string Answer 
		{
			get 
			{
				return _answer;
			}
			set 
			{
				_answer = value;
			}
		}
		public string SoundFileName {
			get {
				return _soundFileName;
			}
			set {
				_soundFileName = value;
			}
		}

        public override string ToString()
        {
            if (!string.IsNullOrEmpty(Question))
            {
                return string.Format("Q: {0}", Question);
            }
            else if (!string.IsNullOrEmpty(Answer))
            {
                return string.Format("A: {0}", Answer);
            }
            else if (!string.IsNullOrEmpty(QuestionImageFileName))
            {
                return string.Format("QI: {0}", QuestionImageFileName);
            }
            else if (!string.IsNullOrEmpty(AnswerImageFileName))
            {
                return string.Format("AI: {0}", AnswerImageFileName);
            }
            else if (!string.IsNullOrEmpty(SoundFileName))
            {
                return string.Format("S: {0}", SoundFileName);
            }
            else
            {
                return "(empty)";
            }
        }

		#endregion
	}
}
